import request from '@/utils/request';


/**
 * 获取发放对象
 * @returns 
 */
export function getAllConsumerList(){
    return request({
        url: '/biz/consumer/getAllConsumerList',
        method: 'get',
    })
}

/**
 * 查询物资去向列表
 * @param {*} current 
 * @param {*} size 
 * @param {*} supplierVO 
 */
export function findConsumerList(current , size , supplierVO){
    return request({
        url : '/biz/consumer/findConsumerList',
        method: 'post',
        params: {
            current,
            size
        },
        data: supplierVO
    })
}

/**
 * 删除去向
 * @param {*} id 
 * @returns 
 */
export function deleteConsumerById(id){
    return request({
        url: '/biz/consumer/deleteConsumerById',
        method: 'delete',
        params: {
            id
        }
    })
}
/**
 * 添加去向
 * @param {*} consumer 
 * @returns 
 */
export function addConsumer(consumer){
    return request({
        url: '/biz/consumer/addConsumer',
        method: 'post',
        data: consumer
    })
}

/**
 * 更新去向
 * @param {*} consumer 
 * @returns 
 */
export function updateConsumer(consumer){
    return request({
        url : '/biz/consumer/updateConsumer',
        method: 'post',
        data: consumer
    })
}